The present invention relates to object detection. More specifically, the present invention relates to the detection of objects in a user-defined area having a patterned background.
Motion detection and object detection systems are known in the art. Frequently, such systems are used to monitor a user-defined area to detect whenever an object enters the area. The equipment needed to implement an object detection system is well known in the art. Such systems comprise an imaging device (typically a video camera) capable of capturing an image of the monitored area and a device for digitizing the captured images. The digitized images are then analyzed in an attempt to detect whether an object has entered the monitored area. There exist many different known methods and algorithms for analyzing digitized images for determining when an object has entered a monitored area. Two of the most common methods utilized are generally referred to as motion segmentation methods or change detection methods.
A change detection method of object detection in an image is accomplished by examining the difference between a current image and a reference image that contains only the static background of the monitored area or scene. A reference image can be thought of as a representation of the monitored area as it would appear if no transitory objects were in view. Change detection algorithms take two digitized images as input and return the locations in the field of view where differences between the images are identified. These differences may be caused by the motion of an object in the field of view, the addition or removal of an object from the scene, changes in illumination, or noise from the digitization process. The objective of change detection algorithms is to locate only the changes that are due to structural changes in the scene, that is, an object moving or the introduction or removal of an object in the scene.
However, many object detection systems are utilized in environments that cause shadows to be cast on the monitored area or zone or in environments that experience significant changes in ambient lighting conditions. Such environments are often found in industrial settings. Shadows may be caused by direct and/or diffuse illumination from the environment outside the monitored area. Objects moving near the monitored area may have their shadows cast into the monitored area. Additionally, shadows may change as the lighting conditions in the environment change. Changes in the lighting conditions may be due to changes in the amount of illumination or movement of the light source.
Object detection systems need to distinguish actual objects in a monitored area from shadows that are being cast into the area and changes in the ambient lighting conditions. Existing techniques have attempted to distinguish actual objects in a monitored area from shadows that are being cast into the area and changes in the ambient lighting conditions, but these existing techniques have enjoyed limited success. Therefore, a need continues to exist in the art for object detection systems and methods that are superior to existing systems and methods for distinguishing objects from shadows and changing lighting conditions.
The present invention provides for object detection that is superior to the prior art at distinguishing between objects that have moved into a monitored area and shadows that have been cast into the monitored area. A patterned background is utilized in the present invention. According to the present invention, portions of the patterned background are analyzed to determine whether an object exists in any of the portions. For purposes of the present specification, each portion of the patterned background is referred to as a mask window. Preferably, the size of the mask window is designed so that it is no larger than the approximate size of the smallest object for which detection is desired. Mask windows are overlapped in a manner so as to cover the area for which object detection is desired. The patterned background is designed so that each mask window contains both light areas and dark areas. In a preferred embodiment, the patterned background is designed so that in each mask window the amount of light area and amount of dark area is approximately equal.
The present invention takes advantages of certain phenomena that occur when, in accordance with the present invention, a live image is compared to a reference image exhibiting a patterned background. First, a difference image produced by subtracting the reference image from a live image containing an object will contain a complement or inverse image of the object. Second, live images containing shadows instead of objects tend to not produce any complements or inverse images in a difference image.
Because the overall background pattern and the position of each mask window are known and do not change during object detection, the background pattern within each mask window is known and is constant. Thus, certain calculations corresponding to each reference image can be made once during initialization of the object detection system and then used as constants during analysis of a live image. This use of constants calculated at initialization allows for faster image analysis at run time, which in turn allows image capture devices with faster frame rates to be used.
According to the present invention, an object is detected when the difference between the expected value for the brightness levels in the portion of the live image corresponding to the portion of the reference image containing light pixels and the expected value for the brightness levels in the portion of the live image corresponding to the portion of the reference image containing dark pixels is less than some threshold T. Stated another way, object detection is indicated whenever the following relationship holds:
(E[LiveL(x,y)]xe2x88x92E[LiveD(x,y)])  less than T,
wherein E[LiveL(x,y)] is the expected value for the brightness levels in the portion of the live image corresponding to the portion of the reference image containing light pixels, wherein E[LiveD(x,y)] is the expected value for the brightness levels in the portion of the live image corresponding to the portion of the reference image containing dark pixels, wherein 0 less than T less than xcex3ref, wherein xcex3ref=(E[RefL(x,y)xe2x88x92E[RefD(x,y)]), wherein E[RefL(x,y) is the expected value of the brightness levels of the light pixels in the reference image and E[RefD(x,y)] is the expected value of the brightness levels of the dark pixels in the reference image. In a preferred embodiment of the present invention, T is equal to about xcex3ref/2.
As explained above, xcex3ref can be calculated once and T can be chosen once at the time when a system embodying the present invention is setup or initialized and then both xcex3ref and T can be used as constants throughout the operation of the system. Alternatively, the reference image could be updated periodically and new values for xcex3ref and T calculated. Updating the reference image periodically would allow for embodiments of the present invention to account for changes in the environment, such as a slight deterioration of the background pattern over time.
The present invention can be embodied in a monitoring system able to detect the intrusion of people (or other objects) into a user-defined safety zone. The present invention provides superior methods for distinguishing between objects actually entering the user-defined area and shadows caused to be cast onto the user-defined area by changes in lighting or objects moving near the user-defined area.